Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 4 - Mappers / Mappers Reference
Constants and Data Types


The TLookupBuffer Structure

A mapper provider uses the TLookupBuffer structure to be able to parse through the buffer passed back in the reply parameter to the OTLookupName function (page 4-25). When you allocate a buffer in which the OTLookupName function places the names it has found, you must cast it as a TLookupBuffer structure. You must make sure that the buffer you allocate is large enough to contain all the names returned by the OTLookupName function, plus up to 3 bytes of padding for each name, plus an additional 8 bytes for each name returned. Figure 4-1 on page 4-8 shows the structure of the reply buffer.

The TLookupBuffer structure is defined by the TLookupBuffer data type.

struct TLookupBuffer
   {  UInt16   fAddressLength;
      UInt16   fNameLength;
      UInt8    fAddressBuffer[1];
   };
Field descriptions

fAddressLength
Specifies the size of the address specified by the fAddressBuffer field.
fNameLength
Specifies the size of the name that is stored in the buffer following the fAddressBuffer field.
fAddressBuffer
Specifies the address to which the entity whose name follows (in the buffer) is bound.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996